from enum import Enum


class ResponseCode(Enum):
    SUCCESS = (0, "SUCCESS")
    ERROR = (1, "ERROR")

    def __new__(cls, code, desc):
        obj = object.__new__(cls)
        obj._value_ = code
        obj.desc = desc
        return obj

    def getCode(self):
        return self.value[0]

    def getDesc(self):
        return self.value[1]






